package cn.foodshopping.mapper;

import cn.foodshopping.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
    @Select("select *from tb_user where open_id=#{openId}")
    User queryByOpenid(String openId);
    @Insert("insert into tb_user (image_url,nick_name,open_id) values (#{avatarUrl},#{nickName},#{openId})")
    void insert(@Param("avatarUrl") String avatarUrl, @Param("nickName") String nickName, @Param("openId") String openId);


}
